< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03120202.xhp

(section: string) (bookmark: bm_id3147291)
String function

String 関数

String Function [Runtime]
String 関数 [実行時](hd_id3147291.1)

Creates a string according to the specified character, or the first character of a string expression that is passed to the function.
与えられた 1 キャラクタ (ないしは文字列表式の最初の 1 文字) を指定回数分繰り返した文字列を作成します。(par_id3147242.2)

(/section: string)

Syntax:
構文:(hd_id3149516.3)

String (n As Long, {expression As Integer | character As String})
String (n As Integer, {expression As Integer | character As String})(par_id3149233.4)

Return value:
戻り値:(hd_id3143270.5)

String
文字列(par_id3147530.6)

Parameters:
パラメータ:(hd_id3154923.7)

n: Numeric expression that indicates the number of characters to return in the string. The maximum allowed value of n is 65535.
n: キャラクタを繰り返す回数を示す数値表式。(par_id3154347.8)

Expression: Numeric expression that defines the ASCII code for the character.
Expression: キャラクタの ASCII コードを示す数値表式。(par_id3148664.9)

Character: Any single character used to build the return string, or any string of which only the first character will be used.
Character: 繰り返し文字列を作成するための 1 キャラクタ。複数キャラクタからなる文字列を指定した場合は、最初の 1 キャラクタが適用されます。(par_id3150359.10)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3152920.11)

Sub ExampleString
Sub ExampleString(par_id3149203.12)

Dim sText as String
Dim sText as String(par_id3154124.13)

sText = String(10,"A")
sText = String(10,"A")(par_id3147230.15)

Msgbox sText
Msgbox sText(par_id3153970.16)

sText = String(10,65)
sText = String(10,65)(par_id3145785.18)

Msgbox sText
Msgbox sText(par_id3147288.19)

End Sub
End Sub(par_id3153138.24)


< Prev / Next >